#define _WIN32_WINNT 0x0501
#pragma warning (disable: 4996)

#include <stdio.h>
#include <windows.h>

void DbgPrintf(LPSTR lpszFmt, ...)
{
  LPSTR *lppParam;
  char szBuff[256];
  lppParam=((LPSTR *)&lpszFmt)+1;
  vsprintf(szBuff, lpszFmt, (LPSTR)lppParam);
  lstrcat(szBuff, "\n");
  OutputDebugString(szBuff);
}

int mgetshort(unsigned char *mp)
{
  int c1, c2;
  c1=*(mp);
  c2=*(mp+1);
  return (c2<<8)+(c1);
}
